package services

import "ShopSupplierApi/models"

//MemberService 会员操作服务层
type MemberService struct{}

//MemberServ 会员操作服务对象
var MemberServ *MemberService

func init() {
	MemberServ = &MemberService{}
}

//ProductMemberList 货品购买者会员列表
//param supplierID uint64 供应商ID
//param productID uint64 货品ID
//param p *Page 数据分页信息
func (m *MemberService) ProductMemberList(supplierID uint64, productID uint64, p *models.Page) []map[string]interface{} {
	return models.ProductMemberList(supplierID, productID, p)
}

//SimpleMemberInfo 基本会员信息
//param memberID uint64 会员ID
func (m *MemberService) SimpleMemberInfo(memberID uint64) map[string]interface{} {
	return models.SimpleMemberInfo(memberID)
}

//MemberList 指定类型会员列表
//param supplierID uint64 供应商ID
//param mType MemberType 会员类型
//param search string   搜索关键字
//param p   *Page   数据分页信息
func (m *MemberService) MemberList(supplierID uint64, mType models.MemberType, search string, p *models.Page) []map[string]interface{} {
	return models.MemberList(supplierID, mType, search, p)
}
